package top.fzqblog.firstapp;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;

import org.greenrobot.eventbus.EventBus;

import butterknife.ButterKnife;
import butterknife.OnClick;
import top.fzqblog.event.MsgEvent;

/**
 * Created by 抽离 on 2017/10/9 0009.
 */

public class EventBusTest extends AppCompatActivity {

    @OnClick(R.id.btn_postEvent)
    public void postEvent(){
        EventBus.getDefault().post(new MsgEvent("消息通知"));
    }

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.event_bus_test);
        ButterKnife.bind(this);
    }
}
